/* The linker command script */

/* Set the entry point */
ENTRY    (opec_cusBinHeader)   


/* Set the memory mapping */
MEMORY 
{
   ROM_MAP (rx)   : ORIGIN = 0x00210000, LENGTH = 512k
   RAM_MAP (!rx)  : ORIGIN = 0x180C0000, LENGTH = 256k
}

SECTIONS
{
   .oat_header :
   {
      opec_header.o ( .rodata* )
   } > ROM_MAP
   
   .text :
   {
      /* define the value of the begin of code section */
      PROVIDE(Image$$RO$$Base = .);
      *( .text ) 
      *( .rodata* )
      /* define the value of the end of code section */
      PROVIDE(Image$$RO$$Limit = .);
      /* define the length of the code section */
      PROVIDE(Image$$ER_RO$$Length = SIZEOF(.text));
      _etext = .;
   } > ROM_MAP

  .data : AT (_etext)
   {
      /* define the value of the begin of data initialised section */
      PROVIDE(Image$$RW$$Base = .);
      *( .data ) 
      /* define the value of the end of data initialised section */
      PROVIDE(Image$$RW$$Limit = .);
      /* define the length of the data initialised section */
      PROVIDE(Image$$ER_RW$$Length = SIZEOF(.data));
   } > RAM_MAP

   .bss :
   { 
      /* define the value of the begin of data zero initialised section */
      PROVIDE(Image$$ZI$$Base = .);
      *( .bss ) 
      *( COMMON ) 
      /* define the value of the end of data zero initialised section */
      PROVIDE(Image$$ZI$$Limit = .);
      PROVIDE(end = .);
      /* define the length of the data zero initialised section */
      PROVIDE(Image$$ER_ZI$$ZI$$Length = SIZEOF(.bss));
   } > RAM_MAP
   
   . = ALIGN(4);
}

